"""
-*- coding:utf-8 -*-
__project__ = 'le-bo16'
__file_name__ = 'rickey'
__author__ = 'RickeyTing'
__time__ = '2020/11/06 19:36'
__product_name = PyCharm
# code is far away from bugs with the god animal protecting
    I love animals. They taste delicious.
              ┏┓      ┏┓
            ┏┛┻━━━┛┻┓
            ┃        ┃
            ┃  ┳┛  ┗┳  ┃
            ┃      ┻      ┃
            ┗━┓      ┏━┛
                ┃      ┗━━━┓
                ┃  神兽保佑    ┣┓
                ┃　永无BUG！   ┏┛
                ┗┓┓┏━┳┓┏┛
                  ┃┫┫  ┃┫┫
                  ┗┻┛  ┗┻┛
"""

# 11.5 日课堂作业练习
str = '123asdhajgtlsafre'
str1 = '你好'

# print(len(str))
# print(str[5])
# print(str[4:7:2])
# print(str[::-2])
# print(str[7:3:-1])
# print(str[2:5])

res = str.find('a')
print(res)

res1 = str.count('g')
print(res1)

res2 = str.index('d')
print(res2)

res3 = str.replace('a','456',1)
print(res3)

res4 = str.split('a')
print(res4)

res5 = str + str1
print(res5)

res6 = str.title()
print(res6)

res7 = str[-3:]
print(res7)


"""
常见切片函数
count, index,find,split,replace,reindex,rfind,
title ：把每个单词首字母大写
startswith()是否以某字母开头、结尾  /endswith()
upper()所有小写字母变大写
"""















